﻿<Window
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
        xmlns:View="clr-namespace:SfdClient.View"

        xmlns:tb="clr-namespace:Hardcodet.Wpf.TaskbarNotification;assembly=Hardcodet.Wpf.TaskbarNotification"
        mc:Ignorable="d" x:Class="SfdClient.MainWindow"
        Title="SyncForDev" 
        Height="768" Width="1024" 
        WindowStartupLocation="CenterScreen" 
        ResizeMode="CanResizeWithGrip"
        Icon="{DynamicResource AppIcon}" 
    WindowStyle="SingleBorderWindow" StateChanged="Window_StateChanged">

    <Window.DataContext>
        <Binding Path="MainWindowViewModel" Source="{StaticResource locator}"/>
    </Window.DataContext>
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto" />
            <RowDefinition Height="*" />
            <RowDefinition Height="Auto"/>
        </Grid.RowDefinitions>
        <tb:TaskbarIcon
            x:Name="MyNotifyIcon"
            ToolTipText="Sync For Developpers" 
			IconSource="/SfdClient;component/Sfd.ico"
			MenuActivation="LeftOrRightClick"
            >
			  <tb:TaskbarIcon.ContextMenu>
			    <ContextMenu>
			      <MenuItem Header="Ouvrir" Click="MenuItem_Click" />
			    </ContextMenu>
			  </tb:TaskbarIcon.ContextMenu>
        </tb:TaskbarIcon>
        <Grid Grid.Row="1">
            <Grid.RowDefinitions>
                <RowDefinition Height="0.8*" />
                <RowDefinition Height="Auto" />
                <RowDefinition Height="0.2*" />
            </Grid.RowDefinitions>
            <View:AzureProjectsView HorizontalAlignment="Stretch"  VerticalAlignment="Stretch" x:Name="azureProjectsView" Visibility="Collapsed"/>
            <View:BrowserView HorizontalAlignment="Stretch" VerticalAlignment="Stretch" x:Name="browserView" Visibility="Collapsed" />
            <View:AccountEditorView HorizontalAlignment="Stretch" VerticalAlignment="Stretch" x:Name="editorView" Visibility="Collapsed" />
            <View:SettingsView HorizontalAlignment="Stretch" VerticalAlignment="Stretch" x:Name="settingsView" Visibility="Collapsed"/>
            <GridSplitter HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Height="5" Grid.Row="1"  />
            <View:LogsView HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Grid.Row="2"/>
        </Grid>

        <StatusBar Grid.Row="2">
            <StatusBarItem >
                <TextBlock Text="{Binding WorkingMessage}"/>
            </StatusBarItem>
        </StatusBar>
    </Grid>
</Window>
